<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta content="" name="description" />
    <meta content="webthemez" name="author" />
    <title>{$Think.config.system_name}</title>
	<link href="__LAYERUI__/css/layui.css" rel="stylesheet" />
	<!-- Bootstrap Styles-->
	<link href="__ASSETS__/css/bootstrap.css" rel="stylesheet" />
	<!-- FontAwesome Styles-->
	<link href="__ASSETS__/css/font-awesome.css" rel="stylesheet" />
	<!-- Morris Chart Styles-->
	<link href="__ASSETS__/js/morris/morris-0.4.3.min.css" rel="stylesheet" />
	<!-- Custom Styles-->
	<link href="__ASSETS__/css/custom-styles.css" rel="stylesheet" />
	
	<!-- JS Scripts-->
	<!-- jQuery Js -->
	<script src="__ASSETS__/js/jquery-1.10.2.js"></script>
	<!-- Bootstrap Js -->
	<script src="__ASSETS__/js/bootstrap.min.js"></script>
	<!-- Metis Menu Js -->
	<script src="__ASSETS__/js/jquery.metisMenu.js"></script>
	<script src="__ASSETS__/js/xm-select.js"></script>
	<!-- Layer Js -->
	<script src="__LAYER__/layer.js"></script>
	<script src="__LAYERUI__/layui.js"></script>
	<!-- Custom Js -->
	<script>
        $(document).ready(function(){
			if($(window).width() < 768) {
				$('.sidebar-collapse').addClass('collapse')
			} else {
				$('.sidebar-collapse').removeClass('collapse')
			}
			$('#main-menu').metisMenu();
			$("#sideNav").click(function(){
				if($(this).hasClass('closed')){
					$('.navbar-side').animate({left: '0px'});
					$(this).removeClass('closed');
					$('#page-wrapper').animate({'margin-left' : '260px'});
				}
				else{
					$(this).addClass('closed');
					$('.navbar-side').animate({left: '-260px'});
					$('#page-wrapper').animate({'margin-left' : '0px'}); 
				}
			});
		});
		//弹出框
		function openlayer(title,url){
			layer.open({
				type: 2,
				title: title,
				maxmin: true,
				area: ['65%', '80%'],
				content: url,
				end: function(){
					//可以添加结束以后的事件
				}
			});
		}
		//选择checkbox
		function checkall(){
			var el=document.getElementsByTagName('input');
			for(var i = 0;i < el.length;i++){
				if(el[i].type=="checkbox"){
					el[i].checked==true?el[i].checked=false:el[i].checked=true;
				}
			}
		}
		function ajaxBox(url){
		    layer.msg('加载中', {
              icon: 16
              ,shade: 0.01
            });
			$.ajax({
				url:url,
				type:'post',
				dataType:'json',
				data:'',
				success:function(data){
				    layer.closeAll('loading');
					if(data.code==0){
						layer.alert(data.message);
					}else{
						layer.alert(data.message, function(index){
							//do something
							window.location.reload();
						});
					}
				}
			});
		}
		function ajaxPrompt(title,url){
			layer.prompt({title:title,formType:2}, function(text,index){
				$.ajax({
					url:url,
					type:'post',
					dataType:'json',
					data:{memo:text},
					success:function(data){
						if(data.code==0){
							layer.alert(data.message);
						}else{
							layer.alert(data.message, function(index){
								//do something
								layer.close(index);
								window.location.reload();
							});
						}
					}
				});
			});
		}
		function ajaxConfirm(title,url){
			layer.confirm(title, {icon: 3, title:'提示'}, function(index){
				$.ajax({
					url:url,
					type:'post',
					dataType:'json',
					data:'',
					success:function(data){
						layer.close(index);
						if(data.code==0){
							layer.alert(data.message);
						}else{
							layer.alert(data.message, function(index){
								//do something
								window.location.reload();
							});
						}
					}
				});
			});
		}
    </script>
	<script>
		layui.use('laydate', function(){
			var laydate = layui.laydate;
			//执行一个laydate实例
			laydate.render({
				elem: '#addtime_fromdate',//指定元素
				type: 'datetime',
				trigger: 'click'
			});
			laydate.render({
				elem: '#addtime_todate',//指定元素
				type: 'datetime',
				trigger: 'click'
			});
			laydate.render({
				elem: '#delivertime_fromdate',//指定元素
				type: 'datetime',
				trigger: 'click'
			});
			laydate.render({
				elem: '#delivertime_todate',//指定元素
				type: 'datetime',
				trigger: 'click'
			});
			laydate.render({
				elem: '#paytime_fromdate',//指定元素
				type: 'datetime',
				trigger: 'click'
			});
			laydate.render({
				elem: '#paytime_todate',//指定元素
				type: 'datetime',
				trigger: 'click'
			});
			laydate.render({
                elem: '#layTime',
                type: 'time',
                format: 'H点m分',
                trigger: 'click'
            });
            laydate.render({
				elem: '#laydaterange',//指定元素
				range: true,
				type: 'datetime',
			});
			laydate.render({
				elem: '#laydate',//指定元素
				type: 'date',
				trigger: 'click'
			});
			laydate.render({
				elem: '#laydate1',//指定元素
				type: 'date',
				trigger: 'click'
			});
			lay('.mdate').each(function(){ //同时绑定多个
				laydate.render({
				  elem: this
				  ,type: 'datetime'
				  ,trigger: 'click'
				});
			});
			lay('#layrange').each(function(){ //同时绑定多个
				laydate.render({
				  elem: this
				  ,range: true
				  ,trigger: 'click'
				});
			});
		});
	</script>	
</head>
<body>
<div id="wrapper">
	<nav class="navbar navbar-default top-navbar" role="navigation">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
				<span class="sr-only">Toggle navigation</span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</button>
			<a class="navbar-brand" href="/"><strong>{$Think.config.system_name}</strong></a>	
			<div id="sideNav" href="">
				<i class="fa fa-bars icon"></i> 
			</div>
		</div>

		<ul class="nav navbar-top-links navbar-right">
			<!-- /.dropdown -->
			<li><a href='/' target="_blank">返回首页</a></li>
			<li>{$Think.session.real_name}</li>
			<li class="dropdown">
				<a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">
					<i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
				</a>
				<ul class="dropdown-menu dropdown-user">
					<li><a href="{:U('/Admin/member/chanagePasswd')}"><i class="fa fa-gear fa-fw"></i>修改密码</a>
					</li>
					<li class="divider"></li>
					<li><a href="{:U('/Admin/member/loginOut')}"><i class="fa fa-sign-out fa-fw"></i>登出</a>
					</li>
				</ul>
				<!-- /.dropdown-user -->
			</li>
			<!-- /.dropdown -->
		</ul>
	</nav>